package com.vis;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class ObjectStructure {
	private List<Element> list=new ArrayList<Element>();
	
	
	public void accept(Visitor vistor){
		Iterator<Element> i=list.iterator();
		while(i.hasNext()){
			i.next().accept(vistor);
			
		}
	}
	
	public void add(Element e){
		list.add(e);
	}
	
	public void remove(Element e){
		list.remove(e);
	}

}
